SUPPORT / SAMPLES & SAS NOTES
 

Support

Problem Note 58961: The error "Violation of PRIMARY KEY constraint" occurs when you publish to the Common Data Model in SAS® Customer Intelligence

DetailsAboutRate It

When you publish the same campaign more than once to the Common Data Model in SAS Customer Intelligence, the publishing process might fail. When this happens, the following error message is generated:

Vendor Code: 100000, Macor [MACCLIST]. SYSDBRC=[23000] and SYSDBMSG=[OLEDB: ICommand::Execute failed.: The statement has been terminated ICommand::Execute failed. : The statement has been terminated.: Violation of PRIMARY KEY constraint 'CP_DT_UDF_PK'. Cannot insert duplicate key in object 'CDM.CI_CAMP_PAGE_DATE_UDF'. The duplicate key value is (xxxxx)].

This error suggests that the publishing process is trying to insert the same row again into the CI_CAMP_PAGE_DATE_UDF table with a new PROCESSED_DTTM column.

The expected behavior is that the process should update the existing row with a new PROCESSED_DTTM column.

The same issue might also occur for these tables:

  • CI_CAMP_PAGE_DATE_UDF
  • CI_CAMP_PAGE_CHAR_UDF
  • CI_CAMP_PAGE_NUM_UDF

When you encounter this issue, make sure that the format that is defined in the ci_cdm_ddl_xxx.sas scripts (located in the SASHOME\SASFoundation\9.4\cicsvr\sasmisc directory) is the same as the format in your database.

For example, if your scripts use the VARCHAR format but the database uses NVARCHAR, you might need to change format in the scripts to the NVARCHAR format to match the database.

After the modification, you need to re-generate the tables.



Operating System and Release Information

Product FamilyProductSystemProduct ReleaseSAS Release
ReportedFixed*ReportedFixed*
SAS SystemSAS Marketing AutomationMicrosoft® Windows® for 64-Bit Itanium-based Systems6.1_M16.1_M19.3 TS1M0
Microsoft Windows Server 2003 Datacenter 64-bit Edition6.1_M16.1_M19.3 TS1M0
Microsoft Windows Server 2003 Enterprise 64-bit Edition6.1_M16.1_M19.3 TS1M0
Microsoft Windows XP 64-bit Edition6.1_M16.1_M19.3 TS1M0
Microsoft® Windows® for x646.1_M16.1_M19.3 TS1M0
Microsoft Windows Server 2003 Datacenter Edition6.1_M16.1_M19.3 TS1M0
Microsoft Windows Server 2003 Enterprise Edition6.1_M16.1_M19.3 TS1M0
Microsoft Windows Server 2003 Standard Edition6.1_M16.1_M19.3 TS1M0
Microsoft Windows Server 2003 for x646.1_M16.1_M19.3 TS1M0
Microsoft Windows Server 20086.1_M16.1_M19.3 TS1M0
Microsoft Windows Server 2008 R26.1_M16.1_M19.3 TS1M0
Microsoft Windows Server 2008 for x646.1_M16.1_M19.3 TS1M0
Microsoft Windows XP Professional6.1_M16.1_M19.3 TS1M0
Windows 7 Enterprise 32 bit6.1_M16.1_M19.3 TS1M0
Windows 7 Enterprise x646.1_M16.1_M19.3 TS1M0
Windows 7 Home Premium 32 bit6.1_M16.1_M19.3 TS1M0
Windows 7 Home Premium x646.1_M16.1_M19.3 TS1M0
Windows 7 Professional 32 bit6.1_M16.1_M19.3 TS1M0
Windows 7 Professional x646.1_M16.1_M19.3 TS1M0
Windows 7 Ultimate 32 bit6.1_M16.1_M19.3 TS1M0
Windows 7 Ultimate x646.1_M16.1_M19.3 TS1M0
Windows Vista6.1_M16.1_M19.3 TS1M0
Windows Vista for x646.1_M16.1_M19.3 TS1M0
64-bit Enabled AIX6.1_M16.1_M19.3 TS1M0
64-bit Enabled HP-UX6.1_M16.1_M19.3 TS1M0
64-bit Enabled Solaris6.1_M16.1_M19.3 TS1M0
HP-UX IPF6.1_M16.1_M19.3 TS1M0
Linux6.1_M16.1_M19.3 TS1M0
Linux for x646.1_M16.1_M19.3 TS1M0
Solaris for x646.1_M16.1_M19.3 TS1M0
* For software releases that are not yet generally available, the Fixed Release is the software release in which the problem is planned to be fixed.